﻿using System;

namespace CMN.Config
{
	/// <summary>
	/// 基本设置描述类, 加[Serializable]标记为可序列化
	/// </summary>
    [Serializable]
    public class SiteConfigInfo : IConfigInfo
    {
        #region 私有字段

        private string _Name="生活百事通";
        private string _Url = "http://www.ershenghuo.com";
        private string _Dir;
        private string _Title = "生活百事通 生活小窍门 生活小常识";
        private string _Keywords;
        private string _Description;
        private Int32 _IsHtml;
        private bool _AllowReg;
        private bool _CheckReg;
        private string _ICP;
        private string _CookiePrev;
        private string _CookieKeyCode;
        private bool _ExecuteSql = false;
        private int _PageSize = 20;
        //用于调试的key
        private string _DebugKey;
        private Int32 _CacheSecond =10;
        private bool _MainSite = false;
        private string _Version = "V0.01";
        private Int32 _PagingNum = 8000;
        private bool _IsCacheTemplate = false;
        private string token = "";
        private Int32 _MaxPageNum = 0;//总共显示页数量
        //private string _KuaiPanconsumer_key = "xc3MeEela0FIL6kf";//快盘申请的key
        //private string _KuaiPanconsumer_secret = "CLnytgfzM1FIfrVH";//开发者srcret
        //private string _KuaiPanUserName = "yang0000meng@qq.com";//模拟授权所使用用户邮箱，一定要记得把账号添加到测试账号列表，不然无法使用！
        //private string _KuaiPanPassWord = "yang2266452";//模拟授权所使用用户对应的密码
        //private int _KuaiPanMaxError = 3;//当出现错误时尝试重新执行的最大次数；
        #endregion


        #region 属性


        /// <summary>
        /// 网站名称
        /// </summary>
        public string Name
        {
            set { _Name = value; }
            get { return _Name; }
        }
        /// <summary>
        /// 网站地址
        /// </summary>
        public string Url
        {
            set { _Url = value; }
            get { return _Url; }
        }


        /// <summary>
        /// 栏目地址
        /// </summary>
        public string ChannelUrl { get; set; }

        /// <summary>
        /// 内容地址
        /// </summary>
        public string ArticleUrl { get; set; }

        /// <summary>
        /// 是否站群
        /// </summary>
        public bool IsZhanQun { get; set; }

        /// <summary>
        /// 采集图片压缩比例
        /// </summary>
        public Int32 CollectImgNum  { get; set; }

        /// <summary>
        /// 文章分页文字大小
        /// </summary>
        public Int32 PagingNum { get { return _PagingNum; } set { _PagingNum = value; } }
        /// <summary>
        /// 安装目录
        /// </summary>
        public string Dir
        {
            set { _Dir = value; }
            get { return _Dir; }
        }
        /// <summary>
        /// 标题尾巴
        /// </summary>
        public string Title
        {
            set { _Title = value; }
            get { return _Title; }
        }
        /// <summary>
        /// 关键字
        /// </summary>
        public string Keywords
        {
            set { _Keywords = value; }
            get { return _Keywords; }
        }
        /// <summary>
        /// 网站描述
        /// </summary>
        public string Description
        {
            set { _Description = value; }
            get { return _Description; }
        }
        /// <summary>
        /// 是否静态1静态、0动态、2部分静态
        /// </summary>
        public Int32 IsHtml
        {
            set { _IsHtml = value; }
            get { return _IsHtml; }
        }
        /// <summary>
        /// 允许注册
        /// </summary>
        public bool AllowReg
        {
            set { _AllowReg = value; }
            get { return _AllowReg; }
        }
        /// <summary>
        /// 注册需要审核
        /// </summary>
        public bool CheckReg
        {
            set { _CheckReg = value; }
            get { return _CheckReg; }
        }

        /// <summary>
        /// 备案号
        /// </summary>
        public string ICP
        {
            set { _ICP = value; }
            get { return _ICP; }
        }
        public Int32 CacheSecond
        {
            set { _CacheSecond = value; }
            get { return _CacheSecond; }
        }
       
        /// <summary>
        /// Cookie前缀
        /// </summary>
        public string CookiePrev
        {
            set { _CookiePrev = value; }
            get { return _CookiePrev; }
        }
        /// <summary>
        /// Cookie加密密钥
        /// </summary>
        public string CookieKeyCode
        {
            set { _CookieKeyCode = value; }
            get { return _CookieKeyCode; }
        }

        /// <summary>
        /// 统计地址
        /// </summary>
        public string CountJs { get; set; }
        /// <summary>
        /// 可以在线执行SQL
        /// </summary>
        public bool ExecuteSql
        {
            set { _ExecuteSql = value; }
            get { return _ExecuteSql; }
        }
       
        /// <summary>
        /// 用于调试的Key
        /// </summary>
        public string DebugKey
        {
            set { _DebugKey = value; }
            get { return _DebugKey; }
        }

        public int PageSize
        {
            set { _PageSize = value; }
            get { return _PageSize; }
        }

        /// <summary>
        /// 是否为主站
        /// </summary>
        public bool MainSite
        {
            set { _MainSite = value; }
            get { return _MainSite; }
        }
       
        public string Version
        {
            set { _Version = value; }
            get { return _Version; }
        }

        /// <summary>
        /// 是否缓存模板
        /// </summary>
        public bool IsCacheTemplate
        {
            set { _IsCacheTemplate = value; }
            get { return _IsCacheTemplate; }
        }
        /// <summary>
        /// 微信Token
        /// </summary>
        public string Token
        {
            get { return token; }
            set { token = value; }
        }
        /// <summary>
        /// 总页数
        /// </summary>
        public Int32 MaxPageNum
        {
            get { return _MaxPageNum; }
            set { _MaxPageNum = value; }
        }

        #endregion
    }
}
